<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    // var [a,b,c,d=4] = [1,2,3];
    // var [a,b,[c,d]] = [1,2,[3,4]];
    // var {a,b,c:h,d,f=5} = {
    //     a:1,
    //     b:2,
    //     c:3,
    //     d:4
    // }

    const arr = [1,2,3,[4,5,[6,[8],7]]];
    console.log(arr.flat(Infinity));
</script>
</html>